#include <bits/stdc++.h>
using namespace std;
#define int long long
#define endl '\n'
int n,m,k,T;

signed main(){
	ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
	int num = 0;
	cin >> num;
	if(num < 0) num = -num;
	if(num == 0) {
		cout << "1" << endl << "0";
        return 0;
	}
    int a = num;
    int cnt = 0;
    while(num > 0) {
        cnt++;
        num /= 10;
    }
    cout << cnt << endl;
    num = a;
	while(num > 0) {
		cout << num % 10 << " ";
		num /= 10;
	}
	
	return 0;
}
